﻿using QQZiFramework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace QQZiFramework.Membership
{
    /// <summary>
    /// 商家子账号
    /// </summary>
    [DBTable(TableName = "A0_ChildAccounts")]
    public class ChildAccount : IDBEntity
    {
        [DBField(Usage = DBFieldUsage.PrimaryKey)]
        public int Id { get; set; }
        /// <summary>
        /// 子账号用户
        /// </summary>
        public int UserId { get; set; }
        /// <summary>
        /// 例如：商家或者代理商的UserId
        /// </summary>
        public int OrganUserId { get; set; }
        public DateTime CreateTime { get; set; }
        /// <summary>
        /// 禁用：-1 启用：1
        /// </summary>
        public int Status { get; set; }
        /// <summary>
        /// 对应类ChildAccountType
        /// </summary>
        public int UserIdType { get; set; }
    }

    public class ChildAccountType { public const int 商家 = 1; public const int 代理商 = 2; }
}
